import express from 'express';
import * as mainPage from './mainPage.controller';
import { authGuard } from '../auth/auth.middleware';

const router = express.Router();

/**
 * 登录
 */
router.get('/main', mainPage.index);

/**
 * 获取菜单
 */
router.get('/menu', mainPage.menu);

/**
 * 创建内容
 */
router.post('/creatmenuAuth', authGuard, mainPage.store);

/**
 * 更新内容
 */
router.patch('/updateMenuAuth/:adminId', mainPage.update);

export default router;
